﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
using System.Text;

namespace HeatMapPrototype
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
            SqlConnection connection = new SqlConnection(GetConnectionString());
            connection.Open();
            SqlCommand cmd = new SqlCommand();
            cmd = new SqlCommand("RetrieveHeatMapCoordinates", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            SqlDataReader reader = cmd.ExecuteReader();

            while (reader.Read())
            {
                coordsTextBox.Text += reader[0].ToString();
            }            
            connection.Close();
            connection.Dispose();
        }

        private string GetConnectionString()
        {
            return ConfigurationManager.AppSettings["SQLConn"];
        }

        protected void testButton1_Click(object sender, EventArgs e)
        {
            
        }

        protected void testButton2_Click(object sender, EventArgs e)
        {
           
        }

        protected void testButton3_Click(object sender, EventArgs e)
        {
            
        }

        protected void testButton4_Click(object sender, EventArgs e)
        {
            
        }         

        protected void testButton5_Click(object sender, EventArgs e)
        {
            
        }        
    }
}